package com.cqfae.deploycentral.app.base;

/**
 * Created by YANGHENG940 on 2017/7/18.
 */
public class BaseConstantCode {

    public static final int JENKINS_DEPLOY_SUCCESS = 0;

    public static final int JENKINS_DEPLOY_FAIL = -1;

    //窗口锁定状态:  10001: 打开
    public static final int WINDOW_OPEN = 10001;

    // 10000: 锁定
    public static final int WINDOW_CLOSE = 10000;

    //SQL检查: 11000:未通过 11001:已通过
    public static final int SQL_CHECK_NOPASS = 11000;

    public static final int SQL_CHECK_PASS = 11001;

    //环境检查: 12000:未通过 12001:已通过
    public static final int ENV_CHECK_NOPASS = 12000;

    public static final int ENV_CHECK_PASS = 12001;

    //部署状态: 13000: 未构建 13001: 已构建 13002: 发布中 13003：发布成功 13004：发布失败 13005：待发布  13006：已发布 13007：已重置
    public static final int DEPLOY_STATUS_NOBUILD = 13000;

    public static final int DEPLOY_STATUS_BUILDED = 13001;

    public static final int DEPLOY_STATUS_PROCESSING = 13002;

    public static final int DEPLOY_STATUS_SUCCESS = 13003;

    public static final int DEPLOY_STATUS_FAIL = 13004;

    public static final int DEPLOY_STATUS_WAITING = 13005;

    public static final int DEPLOY_STATUS_DEPLOYED = 13006;

    public static final int DEPLOY_STATUS_RESET = 13007;

    //需求验收检查: 14000:未通过 14001:已通过
    public static final int REQUIRE_CHECK_NOPASS = 14000;

    public static final int REQUIRE_CHECK_PASS = 14001;

    // 15000:常规上线  15001：按域发布  15002：hotfix发布
    public static final int DEPLOY_TYPE_NORMAL = 15000;

    public static final int DEPLOY_TYPE_DOMAIN = 15001;

    public static final int DEPLOY_TYPE_HOTFIX = 15002;

    // 16000:执行失败 16001:执行成功
    public static final int SCHEDULED_EXEC_FAIL = 16000;

    public static final int SCHEDULED_EXEC_SUCCESS = 16001;

    public static final int SCHEDULED_EXEC_NOTHING = 16002;

    //测试报告状态--初始
    public static final int REPORT_STATUS_INIT = 17000;

    //测试报告状态--占用
    public static final int REPORT_STATUS_OCCUPY = 17001;

    //测试报告状态--待发布
    public static final int REPORT_STATUS_WPUBLISH = 17002;

    //JENKINS回调状态
    public static final int JENKINS_STATUS_GIT_FAIL = 30010;
    public static final int JENKINS_STATUS_BUILD_FAIL = 30020;
    public static final int JENKINS_STATUS_INPUT_FAIL = 30030;
    public static final int JENKINS_STATUS_OUTPUT_FAIL = 30040;
    public static final int JENKINS_STATUS_DEPLOY_FAIL = 30050;
    public static final int JENKINS_STATUS_CHECK_FAIL = 30060;

    public static final int JENKINS_STATUS_GIT_OK = 30011;
    public static final int JENKINS_STATUS_BUILD_OK = 30021;
    public static final int JENKINS_STATUS_INPUT_OK = 30031;
    public static final int JENKINS_STATUS_OUTPUT_OK = 30041;
    public static final int JENKINS_STATUS_DEPLOY_OK = 30051;
    public static final int JENKINS_STATUS_CHECK_OK = 30061;

    //发布回滚中: 18001；发布回滚成功：18002；发布回滚失败: 18003
    public static final int DEPLOY_ROLLBACK_ING = 18001;
    public static final int DEPLOY_ROLLBACK_SUCCESS = 18002;
    public static final int DEPLOY_ROLLBACK_FAIL = 18003;

    // 文件类型PARENT_CODE
    public static final int FILE_TYPE_PARENT_CODE = 33;

    // 文件上传状态
    public static final int FILE_UPLOAD_TYPE_SUCCESS_CODE = 34001;
    public static final int FILE_UPLOAD_TYPE_FAIL_CODE = 34002;

    // 文件上传状态
    public static final int FILE_SYNC_TYPE_SUCCESS_CODE = 35001;
    public static final int FILE_SYNC_TYPE_FAIL_CODE = 35002;
    public static final int FILE_SYNC_TYPE_NO_CODE = 35003;
    public static final int FILE_SYNC_TYPE_EXECUT_CODE = 35004;

    //文件评审状态:
    public static final int APPROVE_STATUS_SUCCESS_CODE = 28001;
    public static final int APPROVE_STATUS_FAIL_CODE = 28002;
    public static final int APPROVE_STATUS_UNTREATED_CODE = 28003;

    //是否接入系统：0、不接入 1.接入
    public static final int APPROVE_ISACCESS_FAIL_CODE = 0;
    public static final int APPROVE_ISACCESS_SUCCESS_CODE = 1;

    //保存至待发布列表异常情况：2.参数残缺；3.保存了相同的reportCode值
    public static final int INSERT_EXPECTPUBLISHENQUEUE_FAIL_CODE_LOSTPARAM = 20001;
    public static final int INSERT_EXPECTPUBLISHENQUEUE_FAIL_CODE_REPEAT = 20002;

    //修改/新增操作的状态码
    public static final int MODIFY_FAIL_CODE = 0;
    public static final int MODIFY_SUCCESS_CODE = 1;
    public static final int MODIFY_NOUPDATE_CODE = -1;

    // 巡查状态
    public static final String INSPECT_STATUS_NORMAL = "38001";
    public static final String INSPECT_STATUS_EXCEPTION = "38002";
    public static final String INSPECT_STATUS_DOING = "38003";

    // 启动巡查方式
    public static final String INSPECT_STATUS_AUTO = "39001";
    public static final String INSPECT_STATUS_HAND = "39002";

    // 巡查显示描述
    public static final String INSPECT_INSTRUCTION_STRING = "40001";

    // 测试报告uat显示flag
    public static final String REPORT_UAT_DISPLOY = "40001";
    public static final String REPORT_UAT_HIDE = "40002";

    //健康检查状态码：0.正常；-1.异常
    public static final int HEALTH_STATUS_NORMAL = 0;
    public static final int HEALTH_STATUS_EXCEPTION = -1;
    public static final int HEALTH_STATUS_UNKOWN = -1;


    private BaseConstantCode() {
        throw new IllegalAccessError("BaseConstantCode class");
    }
}
